package com.xcdh.trading.controller;

import com.xcdh.commons.controller.BaseController;
import com.xcdh.domain.vo.R;
import com.xcdh.trading.entity.CapitalFlow;
import com.xcdh.trading.service.CapitalFlowService;
import com.xcdh.trading.service.IndustryCapitalFlowService;
import com.xcdh.trading.service.SectorCapitalFlowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/capitalFlow")
public class CapitalFlowController extends BaseController<CapitalFlow,CapitalFlowService> {
    @Autowired
    private CapitalFlowService capitalFlowService ;
    @Autowired
    private SectorCapitalFlowService sectorCapitalFlowService ;
    @Autowired
    private IndustryCapitalFlowService industryCapitalFlowService ;

    @PostMapping("/syncCapitalFlow/{tradeDate}")
    public R syncCapitalFlow(@PathVariable String tradeDate){
        capitalFlowService.syncCapitalFlow(tradeDate);
        return R.ok() ;
    }
}
